package org.giovanolli.mumi.controller.business;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

import org.giovanolli.mumi.controller.AbstractModel;
import org.giovanolli.mumi.entities.Address;
import org.giovanolli.mumi.entities.AttentionType;
import org.giovanolli.mumi.entities.AttentionTypeMode;
import org.giovanolli.mumi.entities.City;
import org.giovanolli.mumi.entities.DocumentType;
import org.giovanolli.mumi.entities.Phone;
import org.giovanolli.mumi.entities.Skill;
import org.giovanolli.mumi.entities.Specialist;
import org.giovanolli.mumi.entities.SpecialistFee;
import org.giovanolli.mumi.entities.Speciality;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Controller;

/**
 * The Class SpecialistModel.
 */
@Controller("specialistModel")
@Scope(value = "flow", proxyMode = ScopedProxyMode.TARGET_CLASS)
public class SpecialistModel extends AbstractModel<Specialist> implements Cloneable {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -4295644867846932499L;

	/** The sort property. */
	private String sortProperty;

	/** The first name. */
	private String firstName;

	/** The last name. */
	private String lastName;

	/** The birth date. */
	private Date birthDate;

	/** The document type. */
	private DocumentType documentType;

	/** The selectable document types. */
	private List<DocumentType> selectableDocumentTypes;

	/** The document number. */
	private String documentNumber;

	/** The address. */
	private Address address;

	/** The selectable cities. */
	private List<City> selectableCities;

	/** The selected specialities. */
	private List<Speciality> selectedSpecialities;

	/** The selectable specialities. */
	private List<Speciality> selectableSpecialities;

	/** The selected skills. */
	private List<Skill> selectedSkills;

	/** The selectable skills. */
	private List<Skill> selectableSkills;

	/** The attention time duration. */
	private Integer attentionTimeDuration;

	/** The edited phone. */
	private Phone editedPhone;

	/** The edited specialist fee. */
	private SpecialistFee editedSpecialistFee;

	/** The selectable attention types. */
	private List<AttentionType> selectableAttentionTypes;

	/** The attention type mode. */
	public AttentionTypeMode attentionTypeMode;

	/**
	 * Instantiates a new specialist model.
	 */
	public SpecialistModel() {
		selectedSkills = new ArrayList<Skill>();
		selectedSpecialities = new ArrayList<Speciality>();
		editedPhone = new Phone();
	}

	/**
	 * Gets the address.
	 * 
	 * @return the address
	 */
	public Address getAddress() {
		return address;
	}

	/**
	 * Gets the attention time duration.
	 * 
	 * @return the attention time duration
	 */
	public Integer getAttentionTimeDuration() {
		return attentionTimeDuration;
	}

	/**
	 * Gets the attention type mode.
	 * 
	 * @return the attention type mode
	 */
	public AttentionTypeMode getAttentionTypeMode() {
		return attentionTypeMode;
	}

	/**
	 * Gets the birth date.
	 * 
	 * @return the birth date
	 */
	public Date getBirthDate() {
		return birthDate;
	}

	/**
	 * Gets the document number.
	 * 
	 * @return the document number
	 */
	public String getDocumentNumber() {
		return documentNumber;
	}

	/**
	 * Gets the document type.
	 * 
	 * @return the document type
	 */
	public DocumentType getDocumentType() {
		return documentType;
	}

	/**
	 * Gets the edited phone.
	 * 
	 * @return the edited phone
	 */
	public Phone getEditedPhone() {
		return editedPhone;
	}

	/**
	 * Gets the edited specialist fee.
	 * 
	 * @return the edited specialist fee
	 */
	public SpecialistFee getEditedSpecialistFee() {
		return editedSpecialistFee;
	}

	/**
	 * Gets the first name.
	 * 
	 * @return the first name
	 */
	public String getFirstName() {
		return firstName;
	}

	/**
	 * Gets the last name.
	 * 
	 * @return the last name
	 */
	public String getLastName() {
		return lastName;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.giovanolli.mumi.controller.AbstractModel#getPageNumber()
	 */
	public Integer getPageNumber() {
		return pageNumber;
	}

	/**
	 * Gets the selectable attention type modes.
	 * 
	 * @return the selectable attention type modes
	 */
	public List<AttentionTypeMode> getSelectableAttentionTypeModes() {
		return Arrays.asList(AttentionTypeMode.values());
	}

	/**
	 * Gets the selectable attention types.
	 * 
	 * @return the selectable attention types
	 */
	public List<AttentionType> getSelectableAttentionTypes() {
		return selectableAttentionTypes;
	}

	/**
	 * Gets the selectable cities.
	 * 
	 * @return the selectable cities
	 */
	public List<City> getSelectableCities() {
		return selectableCities;
	}

	/**
	 * Gets the selectable document types.
	 * 
	 * @return the selectable document types
	 */
	public List<DocumentType> getSelectableDocumentTypes() {
		if (selectableDocumentTypes == null) {
			setSelectableDocumentTypes(Arrays.asList(DocumentType.values()));
		}
		return selectableDocumentTypes;
	}

	/**
	 * Gets the selectable skills.
	 * 
	 * @return the selectable skills
	 */
	public List<Skill> getSelectableSkills() {
		return selectableSkills;
	}

	/**
	 * Gets the selectable specialities.
	 * 
	 * @return the selectable specialities
	 */
	public List<Speciality> getSelectableSpecialities() {
		return selectableSpecialities;
	}

	/**
	 * Gets the selected skills.
	 * 
	 * @return the selected skills
	 */
	public List<Skill> getSelectedSkills() {
		return selectedSkills;
	}

	/**
	 * Gets the selected specialities.
	 * 
	 * @return the selected specialities
	 */
	public List<Speciality> getSelectedSpecialities() {
		return selectedSpecialities;
	}

	/**
	 * Gets the sort property.
	 * 
	 * @return the sort property
	 */
	public String getSortProperty() {
		return sortProperty;
	}

	/**
	 * Sets the address.
	 * 
	 * @param address
	 *            the new address
	 */
	public void setAddress(Address address) {
		this.address = address;
	}

	/**
	 * Sets the attention time duration.
	 * 
	 * @param attentionTimeDuration
	 *            the new attention time duration
	 */
	public void setAttentionTimeDuration(Integer attentionTimeDuration) {
		this.attentionTimeDuration = attentionTimeDuration;
	}

	/**
	 * Sets the attention type mode.
	 * 
	 * @param attentionTypeMode
	 *            the new attention type mode
	 */
	public void setAttentionTypeMode(AttentionTypeMode attentionTypeMode) {
		this.attentionTypeMode = attentionTypeMode;
	}

	/**
	 * Sets the birth date.
	 * 
	 * @param birthDate
	 *            the new birth date
	 */
	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}

	/**
	 * Sets the document number.
	 * 
	 * @param documentNumber
	 *            the new document number
	 */
	public void setDocumentNumber(String documentNumber) {
		this.documentNumber = documentNumber;
	}

	/**
	 * Sets the document type.
	 * 
	 * @param documentType
	 *            the new document type
	 */
	public void setDocumentType(DocumentType documentType) {
		this.documentType = documentType;
	}

	/**
	 * Sets the edited phone.
	 * 
	 * @param editedPhone
	 *            the new edited phone
	 */
	public void setEditedPhone(Phone editedPhone) {
		this.editedPhone = editedPhone;
	}

	/**
	 * Sets the edited specialist fee.
	 * 
	 * @param editedSpecialistFee
	 *            the new edited specialist fee
	 */
	public void setEditedSpecialistFee(SpecialistFee editedSpecialistFee) {
		this.editedSpecialistFee = editedSpecialistFee;
	}

	/**
	 * Sets the first name.
	 * 
	 * @param firstName
	 *            the new first name
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * Sets the last name.
	 * 
	 * @param lastName
	 *            the new last name
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.giovanolli.mumi.controller.AbstractModel#setPageNumber(java.lang. Integer)
	 */
	public void setPageNumber(Integer pageNumber) {
		this.pageNumber = pageNumber;
	}

	/**
	 * Sets the selectable attention types.
	 * 
	 * @param selectableAttentionTypes
	 *            the new selectable attention types
	 */
	public void setSelectableAttentionTypes(List<AttentionType> selectableAttentionTypes) {
		this.selectableAttentionTypes = selectableAttentionTypes;
	}

	/**
	 * Sets the selectable cities.
	 * 
	 * @param selectableCities
	 *            the new selectable cities
	 */
	public void setSelectableCities(List<City> selectableCities) {
		this.selectableCities = selectableCities;
	}

	/**
	 * Sets the selectable document types.
	 * 
	 * @param selectableDocumentTypes
	 *            the new selectable document types
	 */
	public void setSelectableDocumentTypes(List<DocumentType> selectableDocumentTypes) {
		this.selectableDocumentTypes = selectableDocumentTypes;
	}

	/**
	 * Sets the selectable skills.
	 * 
	 * @param selectableSkills
	 *            the new selectable skills
	 */
	public void setSelectableSkills(List<Skill> selectableSkills) {
		this.selectableSkills = selectableSkills;
	}

	/**
	 * Sets the selectable specialities.
	 * 
	 * @param selectableSpecialities
	 *            the new selectable specialities
	 */
	public void setSelectableSpecialities(List<Speciality> selectableSpecialities) {
		this.selectableSpecialities = selectableSpecialities;
	}

	/**
	 * Sets the selected skills.
	 * 
	 * @param selectedSkills
	 *            the new selected skills
	 */
	public void setSelectedSkills(List<Skill> selectedSkills) {
		this.selectedSkills = selectedSkills;
	}

	/**
	 * Sets the selected specialities.
	 * 
	 * @param selectedSpecialities
	 *            the new selected specialities
	 */
	public void setSelectedSpecialities(List<Speciality> selectedSpecialities) {
		this.selectedSpecialities = selectedSpecialities;
	}

	/**
	 * Sets the sort property.
	 * 
	 * @param sortProperty
	 *            the new sort property
	 */
	public void setSortProperty(String sortProperty) {
		this.sortProperty = sortProperty;
	}

}
